package classes.view.component
{
	import classes.controller.EDataObject;
	
	import com.d4p.custom.defaultButton.DefaultBtn;
	import com.d4p.util.MouseMove;
	
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	public class PopupSinglePause extends Sprite
	{
		private var _singleBtn:DefaultBtn;
		private var _startClipA:MouseMove;
		private var _startClipB:MouseMove;
		
		public function PopupSinglePause()
		{
			super();
			setLayOut();
			defaultSetting();
			init();
		}
		
		private function setLayOut():void
		{
			_singleBtn		= this.getChildByName('single_btn')					as DefaultBtn;
			_startClipA 	= this._singleBtn.getChildByName('start_out_A')		as MouseMove;
			_startClipB 	= this._singleBtn.getChildByName('start_out_B')		as MouseMove;
			
		}
		private function defaultSetting():void
		{
			_startClipA.gotoAndStop('in');
			_startClipB.gotoAndStop('in');
		}
		private function init():void
		{
			_singleBtn.addEventListener(MouseEvent.CLICK,	onClickHandler);
		}
		private function onClickHandler(e:MouseEvent):void
		{
			//_startClipA.playFrame('out');
		//	_startClipB.playFrame('out');
			dispatchEvent(new EDataObject(["singleResume"], EDataObject.EVENT_DATAOBJECT));
		}
	}
}


